/**
 * 用户相关接口
 */
const router = require('koa-router')();
import reg from "../data/user/reg";
//import user_z from "../data/user/user_z";
//import user_y from "../data/user/user_y";

router.get('/', (ctx: { body: string; }, next: any) => {
    ctx.body = 'hello world';
});
/**
 * 
 */
router.get('/login', async (ctx:any, next: any) => {
    
    //let jg = await user_d(ctx.query)
    //ctx.body = JSON.stringify(jg);
});
/**
 * 注册
 */
router.get('/reg', async (ctx:any, next: any) => {
    console.log("注册请求");
    
    reg(ctx.query,(结果)=>{
        ctx.body = JSON.stringify(结果);
    })
    
});
/**
 * 验证用户key
 */
router.get('/verify', async (ctx:any, next: any) => {
    //let jg = await user_y(ctx.query)
    //ctx.body = JSON.stringify(jg);
});
module.exports = router;